
<?php Yii::app()->clientScript->registerScript('Inventoryact',<<<HERE
   var partno="$inventory->partno";
       
        Ext.onReady(function(){
        
            var store=Ext.create('Ext.data.Store',{
                model:'Inventoryact',
                pageSize:20,
                autoLoad:true,
                proxy:{
                    type:'ajax',
                    url:'index.php?r=inventoryact/list&partno='+partno,
                    reader:{
                        type:'json',
                        root:'data',
                        totalProperty:'totalCount'
                    }
                }
            });

            Ext.create('Ext.ux.LiveSearchGridPanel',{
                store:store,
                height: 450,
                width: grid_width,
                title: 'QTY in Stock',
                renderTo: 'inventoryact-list',
                viewConfig: {
                    stripeRows: true
                },
                features: [{
                    ftype: 'summary'
                }],
                bbar: new Ext.PagingToolbar({
                    pageSize: 20,
                    store:store,
                    displayInfo: true,
                    displayMsg: 'Displaying topics {0} - {1} of {2}',
                    emptyMsg: 'No topics to display'

                }),
                columns:[        
                    {                
                        text:'Warehouse',
                        flex:1,
                        dataIndex:'warehouse',
                      
                    },
                    {                
                        text:'QTY',
                        flex:1,
                        dataIndex:'total',                       
                        summaryType:'sum',
                        summaryRenderer:function(value,summaryData,index){
                            return value+ ' Total In Stock';
                        }
                    }
                     
                    
                ]

            });
        
    });
HERE
        ,CClientScript::POS_BEGIN);?>


<div id="left-col">
    <?php $this->renderPartial('_side',array(
        'inventory'=>$inventory,
    ));?>
</div>

<div id="right-col">

    <div class="wrap">
        <div class="container">

            
            <div id="breadcrumb" style="display:none;"><span style="padding-left:10px;font-size:10px;color:#777777;" id="alsoviewing"></span></div>
            <div class="inside">
             
                <?php $this->renderPartial('/inventory/_view',array('model'=>$inventory));?>
                <?php $this->renderPartial('/inventory/_tab',array('model'=>$inventory));?>
                <br/>
                 
                 
                <div id="inventoryact-list"></div>


                
            </div><!-- inside -->
        </div><!-- container -->
    </div><!-- wrap -->
    <?php $this->renderPartial('/copyright'); ?>
</div> <!-- left-col -->